# eric7.Debugger.WatchPointViewer

Module implementing the watch expression viewer widget.

### Global Attributes

None

### Classes

WatchPointViewer | Class implementing the watch expression viewer widget.

### Functions

None

## WatchPointViewer

Class implementing the watch expression viewer widget.

Watch expressions will be shown with all their details. They can be modified through the context menu of this widget.

### Derived from

QTreeView

### Class Attributes

None

### Class Methods

None

### Methods

WatchPointViewer | Constructor
__addWatchPoint | Private slot to handle the add watch expression context menu entry.
__clearSelection | Private slot to clear the selection.
__configure | Private method to open the configuration dialog.
__createPopupMenus | Private method to generate the popup menus.
__deleteAllWatchPoints | Private slot to handle the delete all watch expressions context menu entry.
__deleteSelectedWatchPoints | Private slot to handle the delete selected watch expressions context menu entry.
__deleteWatchPoint | Private slot to handle the delete watch expression context menu entry.
__disableAllWatchPoints | Private slot to handle the disable all watch expressions context menu entry.
__disableSelectedWatchPoints | Private slot to handle the disable selected watch expressions context menu entry.
__disableWatchPoint | Private slot to handle the disable watch expression context menu entry.
__doEditWatchPoint | Private slot to edit a watch expression.
__doubleClicked | Private slot to handle the double clicked signal.
__editWatchPoint | Private slot to handle the edit watch expression context menu entry.
__enableAllWatchPoints | Private slot to handle the enable all watch expressions context menu entry.
__enableSelectedWatchPoints | Private slot to handle the enable selected watch expressions context menu entry.
__enableWatchPoint | Private slot to handle the enable watch expression context menu entry.
__findDuplicates | Private method to check, if an entry already exists.
__fromSourceIndex | Private slot to convert a source index to an index.
__getSelectedItemsCount | Private method to get the count of items selected.
__layoutDisplay | Private slot to perform a layout operation.
__resizeColumns | Private slot to resize the view when items get added, edited or deleted.
__resort | Private slot to resort the tree.
__setRowSelected | Private slot to select a complete row.
__setWpEnabled | Private method to set the enabled status of a watch expression.
__showBackMenu | Private slot to handle the aboutToShow signal of the background menu.
__showContextMenu | Private slot to show the context menu.
__toSourceIndex | Private slot to convert an index to a source index.
setModel | Public slot to set the watch expression model.

### Static Methods

None

#### WatchPointViewer (Constructor)

WatchPointViewer(parent=None)

Constructor

parent (QWidget)
  reference to the parent widget

#### WatchPointViewer.__addWatchPoint

__addWatchPoint()

Private slot to handle the add watch expression context menu entry.

#### WatchPointViewer.__clearSelection

__clearSelection()

Private slot to clear the selection.

#### WatchPointViewer.__configure

__configure()

Private method to open the configuration dialog.

#### WatchPointViewer.__createPopupMenus

__createPopupMenus()

Private method to generate the popup menus.

#### WatchPointViewer.__deleteAllWatchPoints

__deleteAllWatchPoints()

Private slot to handle the delete all watch expressions context menu entry.

#### WatchPointViewer.__deleteSelectedWatchPoints

__deleteSelectedWatchPoints()

Private slot to handle the delete selected watch expressions context menu entry.

#### WatchPointViewer.__deleteWatchPoint

__deleteWatchPoint()

Private slot to handle the delete watch expression context menu entry.

#### WatchPointViewer.__disableAllWatchPoints

__disableAllWatchPoints()

Private slot to handle the disable all watch expressions context menu entry.

#### WatchPointViewer.__disableSelectedWatchPoints

__disableSelectedWatchPoints()

Private slot to handle the disable selected watch expressions context menu entry.

#### WatchPointViewer.__disableWatchPoint

__disableWatchPoint()

Private slot to handle the disable watch expression context menu entry.

#### WatchPointViewer.__doEditWatchPoint

__doEditWatchPoint(index)

Private slot to edit a watch expression.

index (QModelIndex)
  index of watch expression to be edited

#### WatchPointViewer.__doubleClicked

__doubleClicked(index)

Private slot to handle the double clicked signal.

index (QModelIndex)
  index of the entry that was double clicked

#### WatchPointViewer.__editWatchPoint

__editWatchPoint()

Private slot to handle the edit watch expression context menu entry.

#### WatchPointViewer.__enableAllWatchPoints

__enableAllWatchPoints()

Private slot to handle the enable all watch expressions context menu entry.

#### WatchPointViewer.__enableSelectedWatchPoints

__enableSelectedWatchPoints()

Private slot to handle the enable selected watch expressions context menu entry.

#### WatchPointViewer.__enableWatchPoint

__enableWatchPoint()

Private slot to handle the enable watch expression context menu entry.

#### WatchPointViewer.__findDuplicates

__findDuplicates(cond, special, showMessage=False, index=None)

Private method to check, if an entry already exists.

cond (str)
  condition to check
special (str)
  special condition to check
showMessage (bool)
  flag indicating a message should be shown, if a duplicate entry is found
index (QModelIndex)
  index that should not be considered duplicate

Return:
  flag indicating a duplicate entry

Return Type:
  bool

#### WatchPointViewer.__fromSourceIndex

__fromSourceIndex(sindex)

Private slot to convert a source index to an index.

sindex (QModelIndex)
  source index to be converted

Return:
  mapped index

Return Type:
  QModelIndex

#### WatchPointViewer.__getSelectedItemsCount

__getSelectedItemsCount()

Private method to get the count of items selected.

Return:
  count of items selected

Return Type:
  int

#### WatchPointViewer.__layoutDisplay

__layoutDisplay()

Private slot to perform a layout operation.

#### WatchPointViewer.__resizeColumns

__resizeColumns()

Private slot to resize the view when items get added, edited or deleted.

#### WatchPointViewer.__resort

__resort()

Private slot to resort the tree.

#### WatchPointViewer.__setRowSelected

__setRowSelected(index, selected=True)

Private slot to select a complete row.

index (QModelIndex)
  index determining the row to be selected
selected (bool)
  flag indicating the action

#### WatchPointViewer.__setWpEnabled

__setWpEnabled(index, enabled)

Private method to set the enabled status of a watch expression.

index (QModelIndex)
  index of watch expression to be enabled/disabled
enabled (bool)
  flag indicating the enabled status to be set

#### WatchPointViewer.__showBackMenu

__showBackMenu()

Private slot to handle the aboutToShow signal of the background menu.

#### WatchPointViewer.__showContextMenu

__showContextMenu(coord)

Private slot to show the context menu.

coord (QPoint)
  the position of the mouse pointer

#### WatchPointViewer.__toSourceIndex

__toSourceIndex(index)

Private slot to convert an index to a source index.

index (QModelIndex)
  index to be converted

Return:
  mapped index

Return Type:
  QModelIndex

#### WatchPointViewer.setModel

setModel(model)

Public slot to set the watch expression model.

model (WatchPointModel)
  reference to the watch expression model

Up